home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Video Toaster 4.0
/
Video Toaster v4.0.iso
/
arexx
/
modeler
/
points2polys.lwm
< prev
next >
Wrap
Text File
|
1993-12-13
|
1KB
|
57 lines
/* CMD: Points->Polys
* Convert selected points to single point polygons. Cut whole object.
* By Arnie Cachelin © 1992,93 NewTek Inc. */
Version = 1.1
call addlib "LWModelerARexx.port", 0
sysnam = 'Points To Polygons'
signal on error
signal on syntax
call sel_mode(USER)
/* call removepols() */ /* This command doesn't create 1-point polygons... */
csurf=CurSurface()
call req_begin sysnam
id_txt = req_addcontrol("Convert Object", 'T',"To 1-Point Polygons")
id_srf = req_addcontrol("Surfaces",'R')
if (~req_post()) then do
call req_end
exit
end
surf = req_getval(id_srf)
call req_end()
say surf Csurf
if surf~=CSurf then call surface(surf)
n = xfrm_begin()
say n
call meter_begin 2*n, 'Transforming 'n' Points'
do i = 1 to n
Point.i= xfrm_getpos(i)
say Point.i
call meter_step
end
call xfrm_end()
call CUT()
call add_begin()
do i=1 to n
call add_point Point.i
call add_polygon i
end
call add_end()
call remlib "LWModelerARexx.port"
exit
syntax:
error:
call end_all
t=Notify(1,'!Rexx Script Error','@'ErrorText(rc),'Line 'SIGL)
exit
PointCount: PROCEDURE
n=XFRM_BEGIN()
call END_ALL()
return n